﻿using System.Data.Entity;
using System.Data.Entity.ModelConfiguration.Conventions;
using MM.Data.Entity;

namespace MM.Data.DataContexts
{
    public class MyMoneyContext : DbContext
    {
        public MyMoneyContext()
            : base("MyMoneyContext")
        {
        }

        public DbSet<JournalPayment> JournalPayments { get; set; }
        public DbSet<OperationType> OperationTypes { get; set; }
        public DbSet<Priority> Priorities { get; set; }
        public DbSet<Balance> Balance { get; set; }
        public DbSet<Currency> Currency { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
        }
    }
}
